<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>返回行的数目</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.pg-num-fields.html">pg_num_fields</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.pg-options.html">pg_options</a></div>
 <div class="up"><a href="ref.pgsql.html">PostgreSQL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.pg-num-rows" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">pg_num_rows</h1> 
    <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5)</p><p class="refpurpose"><span class="refname">pg_num_rows</span> &mdash; <span class="dc-title">返回行的数目</span></p>

   </div>
   <div class="refsect1 unknown-unknown-seealsq" id="refsect1-function.pg-num-rows-unknown-unknown-seealsq">
    <h3 class="title">说明</h3>
     <div class="methodsynopsis dc-description">
      <span class="type">int</span> <span class="methodname"><strong>pg_num_rows</strong></span>
       ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$result</code></span>
      )</div>

    <p class="para rdfs-comment">
     <span class="function"><strong>pg_num_rows()</strong></span> 返回 PostgreSQL <em><code class="parameter">result</code></em> 中的行的数目。<em><code class="parameter">result</code></em> 参数是由 <span class="function"><a href="function.pg-query.html" class="function">pg_query()</a></span> 函数返回的查询结果资源号。如果出错则返回 -1。
    </p>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      用 <span class="function"><a href="function.pg-affected-rows.html" class="function">pg_affected_rows()</a></span> 函数获得被 INSERT，UPDATE 和 DELETE 命令影响到的行的数目。
     </p>
    </p></blockquote>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <p class="para">
      本函数以前的名字为 <em>pg_numrows()</em>。
     </p>
    </p></blockquote>
    <p class="para">
     参见 <span class="function"><a href="function.pg-num-fields.html" class="function">pg_num_fields()</a></span> 和 <span class="function"><a href="function.pg-affected-rows.html" class="function">pg_affected_rows()</a></span>。
    </p>
   </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.pg-num-fields.html">pg_num_fields</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.pg-options.html">pg_options</a></div>
 <div class="up"><a href="ref.pgsql.html">PostgreSQL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
